package com.departmentstore.dto;

import com.departmentstore.entity.Department;
import lombok.Data;

@Data
public class DepartmentDTO {
    private String departmentId;
    private String name;
    private String managerId;
    private String managerName;

    public DepartmentDTO() {};
    public DepartmentDTO(Department department) {
        this.departmentId = department.getDepartmentId();
        this.name = department.getName();
        this.managerId = department.getManager().getEmployeeId();
        this.managerName = department.getManager().getName();
    }
}